package cn.studyjava.dubbo.client;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.studyjava.dubbo.service.DemoService;

/**
 * <p>
 * Description:
 * </p>
 * 
 * @author: zhangshenglong
 * @version 1.0.0
 * <p>
 * History:
 * -----------------------------------------------
 * @Date: 2017年3月1日下午1:35:16
 * @author: zhangshenglong
 * @version 1.0.0
 * @OP: Create
 * -----------------------------------------------
 * </p>
 *
 * @since
 * @see
 */
public class DemoClient {
    
    public static void main(String[] args) throws IOException, InterruptedException {  
    	ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext(new String[] { "applicationConsumer.xml" });
        context.start();
        DemoService de = (DemoService) context.getBean("demoService");
        System.err.println("远程调用结果为："+de.random());
        Thread.sleep(5000);
    }  
}
